package com.dxy.dxyproduct.VO;

import lombok.Data;

import javax.validation.constraints.*;
import java.math.BigDecimal;

@Data
public class ProductInfoVO {

    private String productId;

    @NotBlank(message = "productName 不能为空")
    private String productName;

    @NotBlank(message = "categoryType 不能为空")
    private String categoryType;

    @NotNull(message = "productPrice 不能为空")
    @DecimalMin(value = "0.01")
    private BigDecimal productPrice;

    @NotNull(message = "isTui 不能为空")
    @Max(value = 1, message = "isTui 参数错误")
    @Min(value = 0, message = "isTui 参数错误")
    protected Integer isTui;

    @NotNull(message = "isNew 不能为空")
    @Max(value = 1, message = "isNew 参数错误")
    @Min(value = 0, message = "isNew 参数错误")
    private Integer isNew;

    @NotNull(message = "productStock 不能为空")
    private Integer productStock;

    @NotBlank(message = "productIcon 不能为空")
    private String productIcon;

    @NotBlank(message = "productDescription 不能为空")
    private String productDescription;


    @NotNull(message = "productStatus 不能为空")
    @Max(value = 1, message = "productStatus 参数错误")
    @Min(value = 0, message = "productStatus 参数错误")
    private Integer productStatus;

}
